package com.java.manage.controller;

import com.java.common.model.Result;
import com.java.manage.model.Licenseplate;
import com.java.manage.service.LicenseplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 车辆车牌
 */
@RestController
@RequestMapping("/License")
public class LicenseplateController {

    @Autowired
    private LicenseplateService licenseplateService;

    @PostMapping("/list")
    public Result list(@RequestBody Licenseplate licenseplate) {
        return licenseplateService.list(licenseplate);
    }

    @PostMapping("/save")
    public Result save(@RequestBody Licenseplate licenseplate) {
        return licenseplateService.save(licenseplate);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody Licenseplate licenseplate) {
        return licenseplateService.modify(licenseplate);
    }

    @PostMapping("/remove")
    public Result remove(int[] ids) {
        return licenseplateService.remove(ids);
    }

    /**
     * 查询类型
     * @return
     */
    @PostMapping("/plateList")
    public Result plateList() {
        return licenseplateService.plateList();
    }


}
